<?php
/*
 * @Description:
 * @Autor: wangjt
 * @Date: 2020-04-17 15:10:23
 * @LastEditors: wangjt
 * @LastEditTime: 2020-04-20 10:55:44
 */

use Illuminate\Database\Seeder;
use App\User;

class UsersTableSeeder extends Seeder
{
    public function run()
    {
        $users = factory(User::class)->times(50)->make();
        User::insert($users->makeVisible(['password', 'remember_token'])->toArray());

        $user = User::find(1);
        $user->name = 'wjt';
        $user->email = 'wjt@sina.cn';
        $user->password = bcrypt('123456789');
        $user->is_admin = true;
        $user->save();
    }
}